Data race between mozPoisonValue and mozPoisonValueInit
Categories
(Core :: MFBT, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox84 | --- | fixed |
People
(Reporter: ytausky, Assigned: Gankra, NeedInfo)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
It's been nearly a year, it might be worth checking whether this still reproduces. This race looks pretty troubling if it still happens. With the layout poison value having been repurposed into a more widely used thing, maybe its assumptions about XPCOM initialization no longer hold.
Comment 2•6 years ago
|
||
(In reply to :dmajor from comment #1)
It's been nearly a year, it might be worth checking whether this still reproduces. This race looks pretty troubling if it still happens. With the layout poison value having been repurposed into a more widely used thing, maybe its assumptions about XPCOM initialization no longer hold.
This still reproduces on startup, I just hit it on my machine.
Waldo: this could be from the Maybe-poisoning in bug 1414901. The poison value, having its roots in the layout arena code, is only available after XPCOM init, but we use Maybes more universally than that.
Assignee | ||
Comment 4•5 years ago
|
||
Turned this suppression off in a try run to see if it's still a problem. It is. Modern backtrace attached.
Assignee | ||
Comment 5•5 years ago
|
||
Taking this as I think I understand the issue and it has me a bit nervous that it's happening.
Assignee | ||
Comment 6•5 years ago
|
||
Poison was setup at the start of xpcom init when that was assumed to be early enough.
Since then, Poison was added to Maybe, and Maybe has been used everywhere, including in
our channel implementation. As a result, poison was being used before it was initialized.
This basically meant our poison pointers were being replaced with null instead, which
dances into some more UB than accessing a page we have actually allocated. Also, tsan
noticed that accesses to the value were racing with the initializer actually being
called!
A (dynamic) static initializer forces the poison initialization as we can reasonably
hope without getting CallOnce or singleton patterns involved.
Other changes:
- Cleaned up the outdated documentation for mozWritePoison (the alignment
restriction was removed in Bug 1414901) - Removed the poison supression from TSan
Updated•5 years ago
|
Comment 8•5 years ago
|
||
bugherder |
Description
•